import React, {Component} from 'react'
import {Card} from "primereact/card";
import CreateKeyDialog from "../dialog/CreateKeyDialog";

export default class CreatePublicKey extends Component {
    constructor() {
        super();
        this.state = {}
        this.openDialog = this.openDialog.bind(this);
    }

    openDialog(event) {
        this.setState({
            visible: event,
        })
    }

    render() {
        return (
            <div>
                <Card>
                    <div onClick={() => this.openDialog(true)}>
                        <i className="pi pi-calendar" style={{'fontSize': '6em'}}></i>
                        <div className="word">
                            <h2>生成私钥</h2>
                            <h4>快速生成公私钥</h4>
                        </div>
                    </div>
                </Card>
                <CreateKeyDialog visible={this.state.visible} openFunc={this.openDialog}/>

            </div>
        )
    }
}